#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>

void digui(int a, int b)
{
	int t = 0;
	if(b>0)
	{
		t = a;
		a /= pow(10, --b);

		printf("%d ",a);
		digui(t, b);

	}

}

int main()
{
	int a = 0;
	int b = 1;
	int t = 0;
	scanf("%d", &a);
	t = a;
	while (t / 10)
	{
		t /= 10;
		b++;
	}
	digui(a, b);
	return 0;
}